import React from 'react';
// import { BrowserRouter as Router, Switch, Route } from 'react-router-dom'
import { Router, Switch, Route } from 'react-router-dom'
import history from '../assets/js/history.js';

// 引入页面
import Layout from '../components/layout/index.jsx';
import Login from '../pages/login/index.jsx'
import PropertyInfo from '../pages/basicInfo/propertyInfo/index.jsx'
import VillageManagement from '../pages/basicInfo/villageManagement/index.jsx'

class App extends React.Component {
  render(){
    return(
      <Router history={history}>
        <Switch>
          <Route exact path="/" component={Login}></Route>
          <Switch>
            <Layout>
              <Route exact path="/index" component={PropertyInfo}></Route>
              <Route exact path="/villageManagement" component={VillageManagement}></Route>
            </Layout>
          </Switch>
        </Switch>
      </Router>
    )
  }
}

export default App;